#include "system/core/GameDaemon.h"

#include <windows.h>

int
WINAPI WinMain(
		HINSTANCE hInstance ,
		HINSTANCE hPrevInstance ,
		LPSTR lpCmdLine ,
		int nCmdShow ) {
    // add memory leak
    _CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);

    core::GameDaemon* gameDaemon = core::GameDaemon::GetInstance();
    
    gameDaemon->Init();
    gameDaemon->Main();
    gameDaemon->Finish();
    
    SAFE_DELETE( gameDaemon );

    return 0;
}

int
main( int argc, char* argv )
{
    core::GameDaemon* gameDaemon = core::GameDaemon::GetInstance();
    gameDaemon->Init();
    gameDaemon->Main();
    gameDaemon->Finish();
}